package com.share.finance.risk.third.service.async;

import com.share.finance.risk.third.aop.DataCacheAspect;
import com.share.finance.risk.third.service.http.tyc.TycHttpService;
import com.share.finance.risk.third.service.http.tyc.TycParamService;
import com.share.finance.risk.common.model.sys.ThirdRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Slf4j
@Service
@DataCacheAspect
public class TycAsyncService {
    @Autowired
    private TycParamService tycParamService;
    @Autowired
    private TycHttpService tycHttpService;

    /**
     * 通用请求
     *
     * @param thirdRequest
     * @return
     */
    private String common(ThirdRequest thirdRequest) {
        final Map<String, Object> param = tycParamService.param(thirdRequest);
        return tycHttpService.http(thirdRequest, param);
    }

    public String tyc264(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc257(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc258(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc259(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc263(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc367(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc265(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc271(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc270(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc269(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc268(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc267(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc266(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc255(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc424(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc423(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc197(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc196(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc250(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc251(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc252(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc253(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc180(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc256(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc179(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc254(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }

    public String tyc181(ThirdRequest thirdRequest) {
        return common(thirdRequest);
    }
}
